package com.tpc.eb.utils;

import javafx.scene.control.Alert;

public class AlertUtil {
    public static void alert(String message){
        Alert alert = new Alert(Alert.AlertType.INFORMATION);
        alert.setTitle("提示信息");
        alert.setHeaderText(message);
        alert.setContentText(message);
        alert.show();
    }

    public static void FAIL(String contentText){
        Alert alert = new Alert(Alert.AlertType.ERROR);
        alert.setTitle("错误信息");
        alert.setHeaderText("保存失败！");
        alert.setContentText(contentText);
        alert.show();
    }

    public static void FAIL(String headerText,String contentText){
        Alert alert = new Alert(Alert.AlertType.ERROR);
        alert.setTitle("错误信息");
        alert.setHeaderText(headerText);
        alert.setContentText(contentText);
        alert.show();
    }

    public static void SUCCESS(){
        Alert alert = new Alert(Alert.AlertType.INFORMATION);
        alert.setTitle("提示信息");
        alert.setHeaderText("保存成功");
        alert.setContentText("保存成功");
        alert.show();
    }
}
